Transmission control protocol (TCP) is widely used for network communications, including communication via the Internet. TCP is a reliable transport protocol, meaning that it provides various mechanisms to ensure that data sent by a transmitting network node arrives intact at a receiving network node. For example, TCP provides that the receiving node sends an acknowledgement to the transmitting node for each data packet received, such that the transmitting node is notified that the packet arrived at the receiving node.
A transmitting node determines that a sent packet has been lost on the network when either duplicate acknowledgements are received from the receiving node, or a retransmission timeout is reached. Briefly, a duplicate acknowledgement is a notification sent by the receiving node to the transmitting node indicating that one of an ordered sequence of packets has not been received as expected by the receiving node. TCP provides that if the transmitting node receives two duplicate acknowledgements indicating that a particular packet has not been received by the receiving node, the transmitting node determines that the considered packet has been lost on the network, and re-sends it.
A retransmission timeout occurs when the transmitting node does not receive an acknowledgement for a sent packet from the receiving node within a predetermined, expected time (i.e. the retransmission timeout period). In this respect, the retransmission timeout period (hereinafter referred to as “RTO”) varies constantly because it is calculated based on the latency of the connection on which the packet is sent, which also varies constantly. The latency for a connection may vary for any of numerous reasons, such as traffic on the network, the network path chosen for a connection, device failures on the path, and other reasons. Latency is generally defined as the round trip time (hereinafter referred to as “RTT”) for a particular packet on the connection, meaning the period that elapses between when the packet is originally sent on the connection and when an acknowledgement is received for the packet at the transmitting node. A transmitting node usually attempts to measure the RTT for a connection whenever a packet is first transmitted. Specifically, the node begins an RTT sample, which is completed when an acknowledgement is received for the packet, and which serves as a basis for calculating the RTO for subsequent transmissions.
It should be noted that TCP assumes that a retransmission timeout occurs because of congestion on the network. As a result, TCP provides that after a retransmission timeout occurs, the rate at which the transmitting node sends data over the network is reduced significantly, so as to reduce the traffic on the network and allow the congestion to subside.
Conventional network communication according to the TCP protocol, including the measurement of RTT, is illustrated in FIG. 1. In system 100, which implements the TCP protocol, nodes 105, 110, 115, 120, 125 and 130 are connected to network 150 via connections 107, 112, 117, 122, 127 and 132, respectively. For a connection between transmitting node 105 and receiving node 120, transmitting node 105 transmits one or more packets to receiving node 120, initiating an RTT sample for the connection when the one or more packets are sent. Receiving node 120 sends an acknowledgement for each received packet back to transmitting node 105. When this occurs, transmitting node 105 completes the RTT sample for each acknowledged packet. The RTT for the connection is determined by the transmitting node to be the period between when the considered packet is sent and when an acknowledgement for the packet is received. The RTO for subsequent transmissions by transmitting node 105 is calculated based on this RTT. For example, in some implementations, the transmitting node maintains a history of RTT samples, and calculates the RTO based on an RTT value smoothed across multiple samples (e.g., the exponential average of a number of samples).
Despite the fact that latency changes frequently, TCP provides that the RTT for a connection is measured only when the packet in question has never been retransmitted. That is, if the packet is retransmitted (e.g., after a retransmission timeout occurs), an acknowledgement received for the packet is not used to complete an RTT sample. This is because TCP employs Karn's algorithm, which states that when a packet is retransmitted, it can not be reliably determined whether an acknowledgement received for the packet is for the retransmission or the original transmission of the packet. As a result, no conventional technique exists for re-measuring the RTT for a connection when a packet is retransmitted.